package cn.hchaojie.camp.week1.qa;

public class Phone {
	private static final String MESSAGE 
		= "正在使用价格为%.1f元的%s品牌的手机%s。。。\n";

	private String brand;
	private double price;
	
	public Phone() {}
	
	public Phone(String brand, double price) {
		this.brand = brand;
		this.price = price;
	}
	
	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public void call() {
		System.out.printf(MESSAGE, price, brand, "打电话");
	}
	
	public void sendMessage() {
		System.out.printf(MESSAGE, price, brand, "发短信");
	}
	
	public void playGame() {
		System.out.printf(MESSAGE, price, brand, "玩游戏");
	}
}
